package com.itheima.sh.feign.fallback;

import com.itheima.sh.feign.FeignApi;
import com.itheima.sh.pojos.User;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Version: V1.0
 */
@Component
public class UserFeignFallBackApi implements FeignApi {

    // feign对Hystrix支持的降级方法
    @Override
    public User queryById(String username) {
        User user = new User();
        user.setUsername(username);
        user.setName("暂停服务-UserFeignFallBackApi");
        return user;
    }
}
